
<div class="row">
  <div class="col-sm-12">
    <dl class="dl-horizontal dl-horizontal-left">
      <dt translate>Name</dt>
      <dd bst-edit-text="contentCredential.name"
          on-save="save(contentCredential)"
          readonly="denied('edit_content_credentials', contentCredential)">
      </dd>

      <dt translate>Type</dt>
      <dd>{{ contentCredential.content_type | contentTypeFilter }}</dd>

      <dt translate>Content</dt>
      <dd style="font-family: monospace" bst-edit-custom="contentCredential.content"
          readonly="denied('edit_content_credentials', contentCredential)"
          on-save="save(contentCredential)">
        <form role="form"
              action="{{ uploadURL }}"
              ng-upload="uploadContent(content)"
              error-catcher="uploadError(error, content)"
              upload-options-enable-controls
              upload-options-enable-rails-csrf>

          <div class="form-group">
            <textarea class="form-control" ng-model="contentCredential.content"></textarea>
          </div>

          <div class="form-group">
            <input type="file" name="content"/>
          </div>

          <div class="form-group">
            <button type="button" class="btn btn-default" upload-submit ng-click="progress.uploading = true">
              <i class="fa fa-spinner fa-spin" ng-show="progress.uploading"></i>
              <span ng-show="progress.uploading" translate>Uploading...</span>
              <span ng-hide="progress.uploading" translate>Upload</span>
            </button>
          </div>
        </form>
      </dd>

      <dt translate>Products</dt>
      <dd>
        <a ui-sref="content-credential.products">
          {{ contentCredential.gpg_key_products.length +
            contentCredential.ssl_ca_products.length +
            contentCredential.ssl_client_products.length +
            contentCredential.ssl_key_products.length }}
        </a>
      </dd>

      <dt translate>Repositories</dt>
      <dd>
        <a ui-sref="content-credential.repositories">
          {{ contentCredential.gpg_key_repos.length +
             contentCredential.ssl_ca_root_repos.length +
             contentCredential.ssl_client_root_repos.length +
             contentCredential.ssl_key_root_repos.length }}
        </a>
      </dd>
    </dl>
  </div>
</div>
